//
//  EZCameraInfo+CHY.m
//  ALS3.0
//
//  Created by 崔 on 2017/1/6.
//  Copyright © 2017年 guomianxiang. All rights reserved.
//

#import "EZCameraInfo+CHY.h"
#import "EZCameraInfo.h"

@implementation EZCameraInfo (CHY)

- (void)encodeWithCoder:(NSCoder *)aCoder{
    
    [aCoder encodeObject:self.cameraId forKey:@"cameraId"];
    
    [aCoder encodeObject:self.cameraName forKey:@"cameraName"];
    
    [aCoder encodeObject:self.deviceId forKey:@"deviceId"];
    
    [aCoder encodeObject:self.deviceName forKey:@"deviceName"];
    
    [aCoder encodeObject:self.deviceSerial forKey:@"deviceSerial"];
    
    [aCoder encodeObject:self.picUrl forKey:@"picUrl"];
    
    [aCoder encodeInteger:self.channelNo forKey:@"channelNo"];
    
    [aCoder encodeInteger:self.isShared forKey:@"isShared"];
    
    [aCoder encodeBool:self.isEncrypt forKey:@"isEncrypt"];
    
    [aCoder encodeBool:self.isOnline forKey:@"isOnline"];
    
    [aCoder encodeBool:self.isDefence forKey:@"isDefence"];
    
    [aCoder encodeInteger:self.videoLevel forKey:@"videoLevel"];
    
    
}


- (instancetype)initWithCoder:(NSCoder *)aDecoder{
    
    if (self = [super init]) {
        
        self.cameraId = [aDecoder decodeObjectForKey:@"cameraId"];
        
        self.cameraName = [aDecoder decodeObjectForKey:@"cameraName"];
        
        self.deviceId = [aDecoder decodeObjectForKey:@"deviceId"];
        
        self.deviceName = [aDecoder decodeObjectForKey:@"deviceName"];
        
        self.deviceSerial = [aDecoder decodeObjectForKey:@"deviceSerial"];
        
        self.picUrl = [aDecoder decodeObjectForKey:@"picUrl"];
        
        self.channelNo = [aDecoder decodeIntegerForKey:@"channelNo"];
        
        self.isShared = [aDecoder decodeIntegerForKey:@"isShared"];
        
        self.videoLevel = [aDecoder decodeIntegerForKey:@"videoLevel"];
        
        self.isEncrypt = [aDecoder decodeBoolForKey:@"isEncrypt"];
        
        self.isOnline = [aDecoder decodeBoolForKey:@"isOnline"];
        
        self.isDefence = [aDecoder decodeBoolForKey:@"isDefence"];
        
        
    }
    
    return self;
    
}


@end
